﻿CREATE TABLE [dbo].[Security] (
    [SecurityID]                INT          IDENTITY (1, 1) NOT NULL,
    [SecurityTypeID]            INT          NOT NULL,
    [Description]               VARCHAR (50) NULL,
    [TickerSymbol]              VARCHAR (25) NULL,
    [ExchangeID]                INT          NULL,
    [UnderlyingSecurityID]      INT          NULL,
    [DefaultStrategyID]         INT          NULL,
    [DefaultStrategyParameters] VARCHAR (50) NULL,
    CONSTRAINT [PK_Security] PRIMARY KEY CLUSTERED ([SecurityID] ASC),
    CONSTRAINT [FK_Security_Exchange] FOREIGN KEY ([ExchangeID]) REFERENCES [dbo].[Exchange] ([EchangeID]),
    CONSTRAINT [FK_Security_SecurityType] FOREIGN KEY ([SecurityTypeID]) REFERENCES [dbo].[SecurityType] ([SecurityTypeID])
);

